<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateInterviewAssistantTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('interview_assistant', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('company_id')->comment('公司ID');
            $table->integer('send_id')->comment('发送人ID');
            $table->string('receive_id',255)->comment('接受ID');
            $table->text('content')->comment('消息内容');
            $table->tinyInteger('from')->comment('操作来源（1申请简历，2面试通知，3系统通知）');
            $table->tinyInteger('type')->comment('消息类型(1:申请简历，2:同意申请，3:不同意申请,4:面试通知，5:同意，6:不同意，7:群通知)');
            $table->tinyInteger('status')->default(0)->comment('是否操作(0:未操作，1已操作)');
            $table->string('reasion',255)->default('')->comment('原因');
            $table->integer('resume_id')->default(0)->comment('发送人ID');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `interview_assistant` comment '面试助手消息表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('interview_assistant');
    }
}
